#import <Foundation/Foundation.h>
#import <Cocoa/Cocoa.h>
#import "TreeNode.h"

@interface SimpleNodeData : NSObject {
@private
    NSString *name;
    int dictType;
    NSString *path;
    NSImage *iconRep;
    BOOL isLeaf;
    BOOL isExpandable;
    BOOL isSelectable;
}

// Convenience method to return a leaf node with its name set.
+ (id)leafDataWithName:(NSString*)str AndPath:(NSString*)thePath AndDictType:(int)theDictType;
    
// Convenience method to return a branch node with its name set.
+ (id)groupDataWithName:(NSString *)name AndPath:(NSString*)thePath AndDictType:(int)theDictType;
    
// Set and get the name.
- (void)setName:(NSString *)name;
- (NSString *)name;

- (void)setPath:(NSString *)path;
- (NSString *)path;

- (void)setDictType:(int)tmp_type;
- (int)dictType;

// Set and determine the type of this item (leaf or group).
- (void)setIsLeaf:(BOOL)isLeaf;
- (BOOL)isLeaf;
- (BOOL)isGroup;

// Set and get the icon displayed next to the 
- (void)setIconRep:(NSImage *)iconRep;
- (NSImage *)iconRep;

- (void)setExpandable:(BOOL)value;
- (BOOL)isExpandable;

- (BOOL)isSelectable;
- (void)setSelectable:(BOOL)value;

@end

@interface SimpleTreeNode : TreeNode {
}
+ (SimpleTreeNode *) addDeviceToRootNode:(SimpleTreeNode *)rootNode AndDeviceDirPath:(NSString *)deviceDir;
+ (SimpleTreeNode *) addMusicMoviePictureToNode:(SimpleTreeNode *)toNode AndRootPath:(NSString *)rootDir;
+ (void) updateSourceList:(SimpleTreeNode *)rootNode;
+ (void) updateNode:(SimpleTreeNode *)parentNode;
+ (SimpleTreeNode *) addChildNodeWithParentNode:(SimpleTreeNode *)parentNode AndPath:(NSString *)path AndDictType:(int)theDictType;
+ (id)treeFromDictionary;
@end

